package proj.server;

import java.io.IOException;
import java.net.*;

public class ServerSide {
	// 服务器
	public static void main(String[] args) {
		System.out.println("服务器已启动");
		Socket s = null;
		try {
			ServerSocket ss = new ServerSocket(5555);
			while (true) {
				s = ss.accept();
				new ServerThread(s).start();
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			if (s != null)
				try {
					s.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
		}
	}

}
